package entity;

import java.io.Serializable;

public class User implements Serializable {
    public static final int USERNAME_MINIMUM_LENGTH = 6;
    public static final int USERNAME_MAXIMUM_LENGTH = 20;

    public static final int PASSWORD_MINIMUM_LENGTH = 6;
    public static final int PASSWORD_MAXIMUM_LENGTH = 20;
    
    private static final long serialVersionUID = 6930638326470644787L;
    private String username;
    private String password;
    private String nickname;
    private String avatar;

    public User(String username, String password, String nickname, String avatar) {
        this.username = username;
        this.password = password;
        this.nickname = nickname;
        this.avatar = avatar;
    }

    public User(User other) {
        this.username = other.username;
        this.password = other.password;
        this.nickname = other.nickname;
        this.avatar = other.avatar;
    }

    public String getUsername() {
        return username;
    }

    public String getPassword() {
        return password;
    }

    public String getNickname() {
        return nickname;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }
}
